<%@page import="com.lagou.entity.User"%>
<%@page import="com.lagou.entity.Business"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'MyJsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	 <link href="http://www.lagou.com/images/favicon.ico" rel="Shortcut Icon">
    <link href="style/css/style.css" type="text/css" rel="stylesheet">
    <link href="style/css/external.min.css" type="text/css" rel="stylesheet">
    <link href="style/css/popup.css" type="text/css" rel="stylesheet">
   <script type="text/javascript" src="style/js/jquery.1.10.1.min.js"></script>
    <script src="style/js/jquery.lib.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="style/js/ajaxfileupload.js"></script>
    <script src="style/js/additional-methods.js" type="text/javascript"></script>
 <script src="style/js/conv.js" type="text/javascript"></script>
    <script src="style/js/ajaxCross.json" charset="UTF-8"></script>
   <!-- <script type="text/javascript" src="js/jquery-3.2.1.js"></script> -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>
    <script type="text/javascript">
	function tijiao() {
			var neirong = editor.txt.html();//获取富文本区域里面的文字
			$('#nbody').val(neirong);
		}
	</script>
  </head>
  
  <body>
   <div id="body">
      <% 
      Business user=(Business)session.getAttribute("business");
		User u=(User)session.getAttribute("User");
		
		if(user==null) {%>
			  <jsp:include page="geren_resume/gerentop.jsp"></jsp:include>
		<%}else {%>
			<jsp:include page="company_resume/top.jsp"></jsp:include>
		<%} %>
        <div  style="width: 800px; height: 1000px;margin: 10px auto;  overflow-y:auto;">
        
        <h1 style="text-align: center">拉勾网论坛</h1>
        <div id="dyn" style="width: 700px ;margin: 50px auto;" >
        <c:forEach items="${list}" var="l">
        <div style="width: 600px; height: 100px; margin: 30px auto; border-width: 0 0 1px 0; border-style: solid;
    border-color: #019875">
        <h3 style="font-weight: 700">${l.fname}</h3>
        <p>${l.ftext}</p>
        <span style="float:right">${l.ftime}</span>
        </div></c:forEach>
        <div style="width: 600px;height: 50px; margin: 0 auto ">
               <div style=" margin-left: 130px">
                <input type="button" onclick="shou()" value="首页">
                <input type="button" onclick="shang(${index })" value="上一页" >
                <input type="button" onclick="xia(${index })" value="下一页" >
                <input type="button" onclick="wei()" value="尾页">
                <span>当前页数[${index }]&nbsp;&nbsp;总页数[${pagecount}]</span>
        </div>
        </div>
        </div>
        <form action="ForumServlet?op=forum3" method="post">
        <div id="div1"></div> 
						<input type="hidden" id="nbody" name="nbody" />
						<script type="text/javascript">
							const E = window.wangEditor
							const editor = new E("#div1")
							editor.create()
						</script>
        <div style="width: 30px;height: 30px;margin: 30px auto;">
        <input type="submit" value="发送"  onclick="tijiao()" style="margin: 10px auto; font-size: 32px; background-color: #019875 ;color: #fff"/></div>
        </form></div><div class="greybg qrcode mt20" style="margin-top: -800px;margin-left: 1050px;background-color: #fff;bordercolor:#fff;">
                        <img src="style/images/companylist_qr.png" width="242" height="242" alt="拉勾微信公众号二维码" />
                        <span  style="display: block;margin-left: -10px">扫描拉勾二维码，微信轻松搜工作</span>
                    </div>
        <script type="text/javascript">
var i=${index};
//尾页直接给一个最大值首页直接给1传入
var j=99;
var k=1;
/* alert(i); */
function shou() {
		$.post("ForumServlet?op=forum2",{index:k+"/sy"},function(obj){		
			$("#dyn").html(obj);
	}) 
}
function wei() {
		$.post("ForumServlet?op=forum2",{index:j+"/wy"},function(obj){		
			$("#dyn").html(obj);
	}) 
}
function shang(i) {	
	//方法必须传值,也就是当前index
	$.post("ForumServlet?op=forum2",{index:i+"/s"},function(obj){		
		$("#dyn").html(obj);//传本页数字加字母到weiyeServlet判断
}) 
}
function xia(i) {
	//方法必须传值,也就是当前index
	 $.post("ForumServlet?op=forum2",{index:i+"/x"},function(obj){		
		$("#dyn").html(obj);
})  
}
</script>
        <div id="footer">
        <div class="wrapper">
            <a rel="nofollow" target="_blank" href="about.html">联系我们</a>
            <a target="_blank" href="http://www.lagou.com/af/zhaopin.html">互联网公司导航</a>
            <a rel="nofollow" target="_blank" href="http://e.weibo.com/lagou720">拉勾微博</a>
            <a rel="nofollow" href="javascript:void(0)" class="footer_qr">拉勾微信<i></i></a>
            <div class="copyright">&copy;2013-2014 Lagou <a
                    href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action"
                    target="_blank">京ICP备14023790号-2</a></div>
        </div>
    </div>

   <!--  <script src="style/js/core.min.js" type="text/javascript"></script>
    <script src="style/js/popup.min.js" type="text/javascript"></script> -->

    <!--  -->


    <div id="cboxOverlay" style="display: none;"></div>
    <div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;">
        <div id="cboxWrapper">
            <div>
                <div id="cboxTopLeft" style="float: left;"></div>
                <div id="cboxTopCenter" style="float: left;"></div>
                <div id="cboxTopRight" style="float: left;"></div>
            </div>
            <div style="clear: left;">
                <div id="cboxMiddleLeft" style="float: left;"></div>
                <div id="cboxContent" style="float: left;">
                    <div id="cboxTitle" style="float: left;"></div>
                    <div id="cboxCurrent" style="float: left;"></div><button type="button"
                        id="cboxPrevious"></button><button type="button" id="cboxNext"></button><button
                        id="cboxSlideshow"></button>
                    <div id="cboxLoadingOverlay" style="float: left;"></div>
                    <div id="cboxLoadingGraphic" style="float: left;"></div>
                </div>
                <div id="cboxMiddleRight" style="float: left;"></div>
            </div>
            <div style="clear: left;">
                <div id="cboxBottomLeft" style="float: left;"></div>
                <div id="cboxBottomCenter" style="float: left;"></div>
                <div id="cboxBottomRight" style="float: left;"></div>
            </div>
        </div>
        <div style="position: absolute; width: 9999px; visibility: hidden; display: none;"></div>
    </div>
  </body>
</html>
